logo

Fig 1. 3D Visualization of Swings


Question 1 - Create a compelling visual of each swing. Please provide any code snippet you use to create the visual.

Approach : Sifted through the data by checking NaNs, got summary statistics, and since this was a time series dataset, plotted time series trends. From the time series trends, I noticed some ups and downs in variables like bat speed, hand speed, etc. which can be attributed to noise while collecting data from the blast sensors. To counter this and smoothen the noise, I used a low-pass butterworth filter having a threshold of 25Hz for the metrics in the time series plots and 15 Hz for barrel & knob tracking data, since . The filter then handles this noise by allowing the low-frequency signals to pass through while reducing higher-frequency noise, ensuring the filtered signal is smooth. This is something I have seen being used for batter swings in my experience.

After that I focused on dividing the visuals into two main parts with one showing the swing visual and other plotting the time series trends of the metric. Figure 1 shows a 3D visualization of the two swings, while Figure 2 gives you the option to look at the swing trajectory from three different perspectives - Top, Side and Catcher. Figure 3 plots the time series trends of the different metrics present in this dataset - Bat & Hand Speed, Vertical Attack Angle (VAA), Vertical Bat Angle (VBA) and Bat & Body Rotational Rates.

Assumption - While making these plots, I wanted to separate pre-contact and post-contact swing path and metrics to get more idea about the swing and keep things clean. Therefore, I made the assumption that contact with the pitch will ideally be made at max bat speed. Player 2 makes contact before Player 1 by specifically 8 time indices or frames. Note, the 3D visualization does not contain this separation. Apart from this, I have also assumed that the bat vector being tracked is the sweet spot of the bat instead of tip of the bat.
Also, after playing around with the data for the 3D visualization, I found that,

  • x - Towards the 1B to 3B
  • y - From Home Plate to 2B
  • z - Up and Down


Additionally, given more context on the data, I would like to add more things to this report, like using velocity vectors of the barrel and knob to find the vertical and horizontal attack angles as well (even though we do have the vertical attack angle from blast, we can probably refine it using the barrel being tracked).

Fig 2. Swing Views

Top View

Side View

Catcher View

Question 2 - Tell us about each swing.

Comparison : Considering similar pitch conditions for both the players, I came up with the following observations. Before looking into the differences between the two swings, I did notice that both the swings had a common point in space where the assumed contact was made, even though the approach and follow-through were different between the swings. They also had similar bat speed after filtering the noise in the data, with Player 1 having very slightly higher bat speed than Player 2.

Player 1

Player 1 has a gradual downward swing that transitions into a steep upward motion, indicating a focus on producing lift, with relatively controlled body rotation (as seen in Figure 3 - Rotational Rate) and an elevated vertical bat angle (as seen in Figure 3 - Vertical Bat Angle) to maximize fly ball potential. Player 1’s extended bat path post-contact, though slightly slower in achieving the same level of bat speed, is characterized by a controlled swing. This could result into swings with higher launch angles and better adjustability to pitches in different locations.


Player 2

Player 2 shows an aggressive swing that levels off near contact with a compact follow-through (from Figure 1 - 3D Viz), achieving the similar bat speed but also a flattened bat path, indicating a more explosive swing focused on power with potentially a line-drive approach. This aggressive approach might help with high exit velocity, but it might also result into ground outs due to the bat path.


Question 3 - Propose a project using more of this data. If you were to build a model to examine how effective a swing is, what inputs from this would you use? What extra data would you want? What assumptions do you need to make on the swings? What would your model look like?